package io.tim.mvc_f2.bean;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
 * 封装请求信息
 *
 * @author zhangnan
 * @date 2017年3月10日
 *
 */
public class Request {
	
	/**
	 * 请求方法，比如 post or get
	 */
	private String requestMethod;
	
	/**
	 * 请求路径，比如 /expert_insert or /expert_delete，与上面的请求方法结合起来组成 Action 注解的 value() 就是："post:/expert_insert"
	 */
	private String requestPath;
	
	public Request(String requestMethod, String requestPath) {
		this.requestMethod = requestMethod;
		this.requestPath = requestPath;
	}

	public String getRequestMethod() {
		return requestMethod;
	}

	public void setRequestMethod(String requestMethod) {
		this.requestMethod = requestMethod;
	}

	public String getRequestPath() {
		return requestPath;
	}

	public void setRequestPath(String requestPath) {
		this.requestPath = requestPath;
	}

	@Override
	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

	@Override
	public boolean equals(Object obj) {
		return EqualsBuilder.reflectionEquals(this, obj);
	}
	
	

}
